Conditions | 4 |
Paths | 1 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 2 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | /** |
||
17 | constructor () { |
||
18 | 12 | if (new.target === ParserInterface) { |
|
19 | throw new TypeError('ParserInterface is interface') |
||
20 | } |
||
21 | 12 | if (typeof this.parse === 'undefined' || typeof this.parse !== 'function') { |
|
22 | throw new Error('Parse method must be defined') |
||
23 | } |
||
24 | } |
||
25 | } |
||
27 | module.exports = ParserInterface |